<?php

class Menu extends Mysql {
	public function __construct() {
		parent::__construct();
	}
	/**
	 * 查询所有菜单，按照sort排序
	 */
	public function query() {
		$sql = "select * from menu where deleted='0' order by sort asc;";
		return $this->exec_query($sql);
	}
	/**
	 * 添加菜单
	 * //TODO
	 */
	public function add() {
		
	}
	/**
	 * 更新菜单
	 * //TODO
	 */
	public function update() {
	
	}
	/**
	 * 删除菜单
	 */
	public function delete($id) {
		$sql = "delete from menu where id = $id;";
		return $this->exec_update($sql);
	}
}

?>